<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>添加比赛信息</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <!--<link rel="stylesheet" href="//cdn.bootcss.com/zui/1.8.1/css/zui.min.css">-->
    <!-- ZUI Javascript 依赖 jQuery -->
    <!--<script src="//cdn.bootcss.com/zui/1.8.1/lib/jquery/jquery.js"></script>-->
    <!-- ZUI 标准版压缩后的 JavaScript 文件 -->
    <!--<script src="//cdn.bootcss.com/zui/1.8.1/js/zui.min.js"></script>-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-bg-blue">
    <!-- 头部区域 -->
    <div th:replace="index::topbar"></div>

    <!-- 左侧导航区域 -->
    <div th:replace="index::sidebar"></div>

    <!-- 底部固定区域 -->
    <div th:replace="index::bottombar"></div>

    <!-- 内容主体区域 -->
    <div class="layui-body">
        <form class="layui-form" th:action="@{addMatchInformationFinish(league=${league.leagueName})}" method="post">
            <br>

            <div class="layui-form-item">
                <label class="layui-form-label">*比赛时间</label>
                <div class="layui-inline">
                    <input type="text" class="layui-input" id="matchTime" placeholder="请选择比赛时间" name="matchDate">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">*比赛轮次</label>
                <div class="layui-input-inline">
                    <select name="round" lay-verify="required">
                        <option th:each="matchRound:${matchRounds}">[[${matchRound}]]</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">*主队</label>
                <div class="layui-input-inline">
                    <select name="homeTeam">
                        <option th:each="team:${teams}">[[${team.teamName}]]</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">*客队</label>
                <div class="layui-input-inline">
                    <select name="guestTeam">
                        <option th:each="team:${teams}">[[${team.teamName}]]</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">裁判</label>
                <div class="layui-input-inline">
                    <input type="text" name="referee" placeholder="请输入裁判姓名" class="layui-input" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">比赛地点</label>
                <div class="layui-input-inline">
                    <input type="text" name="field" placeholder="请输入比赛地点" class="layui-input" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">比赛状态</label>
                <div class="layui-input-inline">
                    <select name="state">
                        <option >未开始</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="*">完成</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

</div>

<!-- 修改密码弹窗 -->
<script type="text/html" id="pswModel1">
    <div id="pswModel" th:replace="index::changePsw">
    </div>
</script>

</body>

<script src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>

<script>
    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });

    layui.use('laydate', function(){
        var matchTime = layui.laydate;
        //执行一个laydate实例
        matchTime.render({
            elem:'#matchTime'
            ,theme:'#1E9FFF'
        });
    });
</script>
<script>

    layui.use('element', function(){
        var element = layui.element;

        //一些事件监听
        element.on('tab(demo)', function(data){
            console.log(data);
        });
    });

    //侧边导航栏展开并选中添加比赛选项
    $("#matchManage").addClass("layui-nav-itemed");
    $("#addMatchInformation").addClass("layui-this");

    //显示个人信息
    function info() {
        layui.use(['layer'], function(){
            var layer = layui.layer;
            layer.open({
                type:1,
                title:'个人信息',
                area:'350px',
                offset:'120px',
                content:'<ul style="padding:25px 35px 8px 35px;">' +
                '<li>用户名：[[${session.loginUser}]]</li>'+
                '<li>手机号：13657936306</li>'+
                '</ul>',
                btn:['确定'],
                btnAlign:'center'
            });
        });
    }

    //修改密码
    function changePassword() {
        layui.use(['layer'],function () {
            var layer=layui.layer;
            layer.open({
                type: 1,
                title: "修改密码",
                area: '400px',
                offset: '120px',
                content: $("#pswModel1").html()
            });
        })
    }

</script>

</html>

